<footer class="site-footer">

  <div class="wrapper">

    <h3 class="footer-heading">{{ site.title }}</h3>

    <div class="site-navigation">

      <p><strong>Site Map</strong></p>
      <ul class="pages">
        {% for page in site.pages %}
        {% if page.title and page.main_nav != false %}
          <li class="nav-link"><a href="{{ page.url | prepend: site.baseurl }}">{{ page.title }}</a>
        {% endif %}
        {% endfor %}
      </ul>
    </div>

    <div class="site-contact">

      <p><strong>Contact</strong></p>
      <ul class="social-media-list">
        <li>
          <a href="mailto:{{ site.email }}">
            <i class="fa fa-envelope-o"></i>
            <span class="username">{{ site.email }}</span>
          </a>
        </li>

        {% for social in site.social %}
          {% if social.url != null %}
          <li>
            <a href="{{ social.url }}" title="{{ social.desc }}">
              <i class="fa fa-{{ social.icon }}"></i>
              <span class="username">{% if social.username %}{{ social.username }}{% else %}{{ social.name }}{% endif %}</span>
            </a>
          </li>
          {% endif %}
        {% endfor %}

      </ul>
    </div>

    <div class="site-signature">
      <p class="rss-subscribe text"><strong>Subscribe <a href="{{ "/feed.xml" | prepend: site.baseurl }}">via RSS</a></strong></p>
      <p class="text">{{ site.description }}</p>
    </div>

  </div>

</footer>

<!-- Scripts -->
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.5/highlight.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/lightbox2/2.7.1/js/lightbox.min.js"></script>

<script type="text/javascript">
$(document).ready(function() {
  // Default syntax highlighting
  hljs.initHighlightingOnLoad();

  // Header
  var menuToggle = $('#js-mobile-menu').unbind();
  $('#js-navigation-menu').removeClass("show");
  menuToggle.on('click', function(e) {
    e.preventDefault();
    $('#js-navigation-menu').slideToggle(function(){
      if($('#js-navigation-menu').is(':hidden')) {
        $('#js-navigation-menu').removeAttr('style');
      }
    });
  });
});

</script>

{% if page.custom_js %}
<!-- Custom page specific js files -->
  {% for js_file in page.custom_js %}
    <script src='/js/{{ js_file }}.js' type="text/javascript"></script>
  {% endfor %}
{% endif %}

{% if site.ga_tracking_id %}
<!-- Google Analytics -->
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  ga('create', '{{ site.ga_tracking_id }}', 'auto');
  ga('send', 'pageview', {
    'page': '{{ page.url }}',
    'title': '{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}'
  });
</script>
{% endif %}
